<% sort_class = params[:direction] == 'desc' ? 'sortdown' : 'sortup' %>
<tr>
  <th class="align_center not-sortable"><%= check_box_tag 'select_all' %></th>
  <th class="align_center sorting header <%= sortable_class('invoice_number') %>"><%= sortable('invoice_number', "#{t('invoice')} #") %></th>
  <th class="align_left header <%= sortable_class('clients.organization_name') %>"><%= sortable('clients.organization_name', t('client')) %></th>
  <th class="align_right header sorting {sorter:'thousands'} <%= sortable_class('invoice_total') %>"><%= sortable('invoice_total', t('views.common.total')) %></th>
  <th class="align_center header <%= sortable_class('invoice_date') %>"><%= sortable('invoice_date', t('views.common.date')) %></th>
  <th class="align_left header <%= sortable_class('due_date') %>"><%= sortable('due_date', t('views.invoices.due_date')) %></th>
  <th class="align_center header <%= sortable_class('status') %>"><%= sortable('status', t('views.common.status')) %></th>
  <th class="align_center header <%= sortable_class('invoice_type') %>"><%= sortable('invoice_type', t('views.common.invoice_type')) %></th>
  <th class="align_center not-sortable "><%= t '.actions', :default => t("helpers.actions") %></th>
</tr>